package com.zpark.controller;

import com.zpark.beans.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/config")
public class ConfigController {

     //自动注入
   @Autowired
   private  Person person;

   @Value("${server.port}")
   private String port;




   @RequestMapping("/person")
    public Person getPerson(){
        return person;
    }
    @RequestMapping("/port")
    public String getPort(){
       return port;
    }
}
